class Pagination {
  late int page;
  late int pageSize;
  late num totalCount;

  Pagination({this.page = 1, this.pageSize = 20, this.totalCount = 0});

  Pagination.fromJson(Map<String, dynamic> json) {
    page = json["page"];
    pageSize = json["pageSize"];
    totalCount = json["totalCount"];
  }

  static List<Pagination> fromList(List<Map<String, dynamic>> list) {
    return list.map(Pagination.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["page"] = page;
    _data["pageSize"] = pageSize;
    _data["totalCount"] = totalCount;
    return _data;
  }
}
